import java.util.ArrayList;
import java.util.List;

public class LeetCode1431 {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        List<Boolean>  resultList = new ArrayList<>(candies.length);
        int max = 0;
        for (int i = 0; i < candies.length; i++){
            if (max < candies[i]){
                max = candies[i];
            }
        }

        for (int i = 0; i < candies.length; i++){
            resultList.add(max <= candies[i] + extraCandies);
        }

        return resultList;

    }
}
